////////////////////////////////////////////////////////////////////////////////
// Copyright 2006 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   COMPANY
// AUTHOR           :   Victor Zheng 
// DATE CREATE      :   2006/02/01
// DESCRIPTION      :   a SEARCH FORM file for the function, COMPANY
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2006/02/01   Victor Zheng    1.0                 source is generated.
//
//
//
////////////////////////////////////////////////////////////////////////////////

package com.erp.app.admin.companySetup.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.erp.framework.controller.form.SimpleSearchStyleForm;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>SearchForm</strong> is a JavaBean which provides property
* getter and setter methods for all of the bean properties, and implements
* <code>Serializable</code>, as required by the JavaBean specification
* The main purpose for this bean is to get the user search criteria input
* from the web browsers.
*
* @author          Victor Zheng 
* @version 1.0     2006/02/01
* @since           FrameWork 1.0
*
*/

// Note:
// Currently only generates the first 5 fields of a table
// (excluding the COMPANY_CODE field).
// However, this number can be set in GenConstants.NO_CRITERIA

public class CompanySearchForm extends SimpleSearchStyleForm {

	//Searching Criteria Attributes (DB Table Name: T_COMPANY)
	private String srchCompanyCode;                  //DB Column Name: COMPANY_CODE
	private String srchStatus;                       //DB Column Name: STATUS
	private String srchShortNameFr;                  //DB Column Name: SHORT_NAME
	private String srchShortNameTo;                  //DB Column Name: SHORT_NAME
	private String srchLongNameFr;                   //DB Column Name: LONG_NAME
	private String srchLongNameTo;                   //DB Column Name: LONG_NAME
	private String srchAddr1Fr;                      //DB Column Name: ADDR1
	private String srchAddr1To;                      //DB Column Name: ADDR1
	private String srchAddr2Fr;                      //DB Column Name: ADDR2
	private String srchAddr2To;                      //DB Column Name: ADDR2
	private String srchAddr3Fr;                      //DB Column Name: ADDR3
	private String srchAddr3To;                      //DB Column Name: ADDR3

	private String editCompanyCode;

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      the action errors array
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void validateSearch(ActionErrors errors) {

		try {

		} catch (Exception e) {
			Logger.logExceptions(this, e);
		}
	}

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      mapping      the action mapping
	* @param      formIn       the action form
	* @param      request      the http request
	* @param      response     the http response
	* @param      errors       the action errors array
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void moreValidateSearch(ActionMapping mapping, ActionForm formIn,
		HttpServletRequest request, HttpServletResponse response, ActionErrors errors) {

		HttpSession session = request.getSession(false);

		try {

		} catch (Exception e) {
			Logger.logExceptions(this, e);
		}
	}

	/**
	* Converts to a string representing the data in this object.
	* A new <code>String</code> object is allocated and initialized to 
	* contain the character sequence currently represented by this 
	* object. This <code>String</code> is then returned. Subsequent 
	* changes to this object do not affect the contents of the 
	* <code>String</code>. 
	*
	* @return     a string representation of the object.
	* @see        java.lang.Object#toString()
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public String toString() {

		String colStr = "COL: {srchShortNameFr = " + this.srchShortNameFr
			+ "\n, srchShortNameTo = " + this.srchShortNameTo
			+ "\n, srchLongNameFr = " + this.srchLongNameFr
			+ "\n, srchLongNameTo = " + this.srchLongNameTo
			+ "\n, srchAddr1Fr = " + this.srchAddr1Fr
			+ "\n, srchAddr1To = " + this.srchAddr1To
			+ "\n, srchAddr2Fr = " + this.srchAddr2Fr
			+ "\n, srchAddr2To = " + this.srchAddr2To
			+ "\n, srchAddr3Fr = " + this.srchAddr3Fr
			+ "\n, srchAddr3To = " + this.srchAddr3To + "}\n";

		String mandatoryStr = "{srchCompanyCode = " + this.srchCompanyCode
			+ "\n, srchStatus = " + this.srchStatus
			+ "}\n";

		String editStr = "{editCompanyCode = " + this.editCompanyCode + "}";

		return "toString() is:\n" + mandatoryStr + colStr + editStr;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for searching criterias
	////////////////////////////////////////////////////////////////////////////////

	public String getSrchCompanyCode() {
		return this.srchCompanyCode;
	}

	public String getSrchStatus() {
		return this.srchStatus;
	}

	public String getSrchShortNameFr() {
		return this.srchShortNameFr;
	}

	public String getSrchShortNameTo() {
		return this.srchShortNameTo;
	}

	public String getSrchLongNameFr() {
		return this.srchLongNameFr;
	}

	public String getSrchLongNameTo() {
		return this.srchLongNameTo;
	}

	public String getSrchAddr1Fr() {
		return this.srchAddr1Fr;
	}

	public String getSrchAddr1To() {
		return this.srchAddr1To;
	}

	public String getSrchAddr2Fr() {
		return this.srchAddr2Fr;
	}

	public String getSrchAddr2To() {
		return this.srchAddr2To;
	}

	public String getSrchAddr3Fr() {
		return this.srchAddr3Fr;
	}

	public String getSrchAddr3To() {
		return this.srchAddr3To;
	}

	public String getEditCompanyCode() {
		return this.editCompanyCode;
	}

	public void setSrchCompanyCode(String srchCompanyCode) {
		this.srchCompanyCode = srchCompanyCode;
	}

	public void setSrchStatus(String srchStatus) {
		this.srchStatus = srchStatus;
	}

	public void setSrchShortNameFr(String srchShortNameFr) {
		this.srchShortNameFr = srchShortNameFr;
	}

	public void setSrchShortNameTo(String srchShortNameTo) {
		this.srchShortNameTo = srchShortNameTo;
	}

	public void setSrchLongNameFr(String srchLongNameFr) {
		this.srchLongNameFr = srchLongNameFr;
	}

	public void setSrchLongNameTo(String srchLongNameTo) {
		this.srchLongNameTo = srchLongNameTo;
	}

	public void setSrchAddr1Fr(String srchAddr1Fr) {
		this.srchAddr1Fr = srchAddr1Fr;
	}

	public void setSrchAddr1To(String srchAddr1To) {
		this.srchAddr1To = srchAddr1To;
	}

	public void setSrchAddr2Fr(String srchAddr2Fr) {
		this.srchAddr2Fr = srchAddr2Fr;
	}

	public void setSrchAddr2To(String srchAddr2To) {
		this.srchAddr2To = srchAddr2To;
	}

	public void setSrchAddr3Fr(String srchAddr3Fr) {
		this.srchAddr3Fr = srchAddr3Fr;
	}

	public void setSrchAddr3To(String srchAddr3To) {
		this.srchAddr3To = srchAddr3To;
	}

	public void setEditCompanyCode(String editCompanyCode) {
		this.editCompanyCode = editCompanyCode;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Other Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////


}
